probToClass <- function(probabilities, threshold){
	result<-vector(length=dim(probabilities)[1]);
	for(i in 1:dim(probabilities)[1]){
		if(probabilities[i,1]>threshold){
			result[i]=colnames(probabilities)[1];
		}else{
			result[i]=colnames(probabilities)[2];
		}
	}
	result;
}
